package com.sky.mapper;

import com.sky.annotaition.AutoFill;
import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 套餐持久层
 */
@Mapper
public interface SetmealDishMapper {
    /**
     * 根据ID查询
     * @param dishIds
     * @return
     */
    List<Long> selectById(List<Long> dishIds);

    /**
     * 新增
     * @param setmealDishes
     */
    void insert(List<SetmealDish> setmealDishes);

    /**
     * 根据ID查询
     * @param id
     * @return
     */
    List<SetmealDish> selectBySetmeaId(Long id);

    /**
     * 根据ID删除
     * @param id
     */
    @Delete("delete from setmeal_dish where setmeal_id = #{id}")
    void delect(Long id);

    /**
     * 删除
     * @param id
     */
    @Delete("delete from setmeal_dish where setmeal_id = #{id}")
    void delect2(Long id);
}
